using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RiceShop.Models
{
    /// <summary>
    /// 物流信息
    /// </summary>
    public class LogisticsInfo
    {
        /// <summary>
        /// 物流单号
        /// </summary>
        public string LogisticsNo { get; set; } = string.Empty;

        /// <summary>
        /// 物流公司
        /// </summary>
        public string LogisticsCompany { get; set; } = string.Empty;

        /// <summary>
        /// 物流状态（0:暂无轨迹,1:已揽收,2:运输中,3:派送中,4:已签收,5:异常）
        /// </summary>
        public byte Status { get; set; }

        /// <summary>
        /// 状态描述
        /// </summary>
        public string StatusDesc { get; set; } = string.Empty;

        /// <summary>
        /// 收件人
        /// </summary>
        public string ReceiverName { get; set; } = string.Empty;

        /// <summary>
        /// 收件人电话
        /// </summary>
        public string ReceiverPhone { get; set; } = string.Empty;

        /// <summary>
        /// 收件人地址
        /// </summary>
        public string ReceiverAddress { get; set; } = string.Empty;

        /// <summary>
        /// 物流轨迹
        /// </summary>
        public List<LogisticsTrace> Traces { get; set; } = new();
    }

    /// <summary>
    /// 物流轨迹
    /// </summary>
    public class LogisticsTrace
    {
        /// <summary>
        /// 时间
        /// </summary>
        public DateTime Time { get; set; }

        /// <summary>
        /// 地点
        /// </summary>
        public string Location { get; set; } = string.Empty;

        /// <summary>
        /// 状态
        /// </summary>
        public string Status { get; set; } = string.Empty;

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// 操作员
        /// </summary>
        public string Operator { get; set; } = string.Empty;
    }
} 